home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 25 / 025.d81 / t.rotate sprites < prev    next >
Text File  |  2022-08-26  |  2KB  |  122 lines

  1.  
  2.  
  3.           ROTATE SPRITES
  4.                 by
  5.             Dean Rossa
  6.  
  7.  
  8. COMMODORE POWER/PLAY MAGAZINE
  9. June/July, 1986
  10. p.60
  11.  
  12.  
  13.   The title of this program says it
  14.  
  15. all: with ROTATE SPRITES you can
  16.  
  17. rotate a sprite 90 degrees or flip it
  18.  
  19. 180 degrees around a horizontal or
  20.  
  21. vertical axis without having to
  22.  
  23. redesign the sprite.
  24.  
  25.  
  26.   When you run ROTATE SPRITES, you
  27.  
  28. first see a sample sprite.  Pressing
  29.  
  30. "Y" will display the data for that
  31.  
  32. sprite.  (You will be prompted to see
  33.  
  34. the data after every rotation.)  Once
  35.  
  36. you have seen the data, pressing any
  37.  
  38. key will take you to a menu that lets
  39.  
  40. you
  41.  
  42.  
  43. 1. Flip the sprite right to left
  44.  
  45.  
  46. 2. Flip sprite up to down
  47.  
  48.  
  49. 3. Rotate sprite 90 degrees, spreading
  50.    data evenly over columns and rows.
  51.  
  52.  
  53. 4. Rotate sprite 90 degrees, stripping
  54.    data from right side of sprite.
  55.  
  56.  
  57.   There is really no need to talk
  58.  
  59. about the first two options, but
  60.  
  61. options Three and Four might need some
  62.  
  63. explaining.  You see, a sprite grid
  64.  
  65. has 21 rows and 24 columns; it isn't a
  66.  
  67. perfect square.  Thus when you rotate
  68.  
  69. a sprite 90 degrees, the new sprite
  70.  
  71. will not be identical to the
  72.  
  73. original.
  74.  
  75.  
  76.   Option Three deals with this problem
  77.  
  78. by dropping every eighth column from
  79.  
  80. the old sprite while Option Four
  81.  
  82. shaves three of the rightmost columns
  83.  
  84. off of the old sprite.  Thus the
  85.  
  86. configuration of the original sprite
  87.  
  88. will determine which option you
  89.  
  90. choose.
  91.  
  92.  
  93.   OK, how do you use ROTATE SPRITES
  94.  
  95. in your own programs?  The first
  96.  
  97. thing that you must do is go to the
  98.  
  99. data statements at the end of ROTATE
  100.  
  101. SPRITES and change them to make your
  102.  
  103. own sprite.  When you go back to the
  104.  
  105. menu screen, you can rotate the new
  106.  
  107. sprite.  After each rotation, you
  108.  
  109. can see the data for that rotation.
  110.  
  111. If you write this data down, you can
  112.  
  113. use it in your own program.
  114.  
  115.  
  116. FILES REQUIRED:
  117.  
  118. ROTATE SPRITES
  119.  
  120. -----------< end of text >------------
  121.  
  122.